/**
 * @file index.js
 * @author swan
 */
const app = getApp()

const mainUrl = 'https://m.shengyidi.com/'

Page({
    data: {
        turl: ''
    },
    onLoad(query) {
        console.log(query)

        let url = mainUrl
        // let url = mainUrl + '/adult/jy-61951/'

        if (query.first) {
            url += query.first + '/'
        }
        if (query.second) {
            url += query.second + '/'
        }
        if (query.third) {
            url += query.third + '/'
        }

        this.setData({
            turl: url
        })

        console.log(this.getData('turl'))
    },
    onShow() {
        swan.setPageInfo({
            title: '生意地-英语培训教育专家',
            keywords: '生意地,英语培训教育专家',
            description: '生意地,英语教育培训专家,专注英语教育事业,为您提供客观详细的英语机构信息,海量真实学员咨询案例与反馈,帮您换个角度看机构',
            image: [
                'https://img.nadiyi.cn/shengyidi/wap/v20190917/images/syd-new-logo.png'
            ]
        })
    }
})
